Skip to content

fix(parquet/file): reject records starting with nonzero repetition levels - #1009

Merged
zeroshade merged 1 commit into
apache:mainfrom
fallintoplace:fix/parquet-invalid-record-repetition-level
Jul 27, 2026
Merged

fix(parquet/file): reject records starting with nonzero repetition levels#1009
zeroshade merged 1 commit into
apache:mainfrom
fallintoplace:fix/parquet-invalid-record-repetition-level

Conversation

@fallintoplace

Copy link
Copy Markdown
Contributor

Rationale for this change

A repeated column must start each logical record at repetition level zero. The record reader currently accepts a nonzero first repetition level and silently treats it as part of a record, which can miscount record boundaries.

What changes are included in this PR?

  • Return an error when record delimiting begins on a nonzero repetition level.
  • Propagate that error through ReadRecordData.
  • Add a focused test that also verifies the invalid level is not consumed.

Are these changes tested?

Yes. The focused parquet/file test passes.

@fallintoplace
fallintoplace requested a review from zeroshade as a code owner July 25, 2026 15:59

@zeroshade zeroshade left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified: a repeated column must begin each logical record at repetition level 0, but the delimiter accepted a nonzero first repetition level and silently folded it into a record, miscounting boundaries. This cannot false-positive, since a genuine record start always has `curRep == 0`. The new error is threaded through `ReadRecordData` correctly, `errors` is already imported, and the test confirms the invalid level is not consumed. LGTM.

@zeroshade
zeroshade merged commit a73034c into apache:main Jul 27, 2026
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants